Skip to content

Conversation

@tiyash-basu-frequenz
Copy link
Contributor

closes #357

@tiyash-basu-frequenz tiyash-basu-frequenz self-assigned this Jun 5, 2025
Copilot AI review requested due to automatic review settings June 5, 2025 08:22
@tiyash-basu-frequenz tiyash-basu-frequenz requested a review from a team as a code owner June 5, 2025 08:22
@github-actions github-actions bot added the part:protobuf Affects the protocol buffer definition files label Jun 5, 2025
@tiyash-basu-frequenz tiyash-basu-frequenz added the cmd:skip-release-notes It is not necessary to update release notes for this PR label Jun 5, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the vendor diagnostic code fields in several microgrid component protos from a numeric type to a string, aligning examples and enabling more flexible vendor codes.

  • Changed vendor_diagnostic_code from uint32 to string in three proto messages.
  • Updated inline JSON examples to show vendor codes as strings.
  • (Consider: document breaking change and add tests.)

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
proto/frequenz/api/common/v1/microgrid/sensors/sensors.proto Changed vendor_diagnostic_code to string; example JSON updated
proto/frequenz/api/common/v1/microgrid/electrical_components/electrical_components.proto Changed vendor_diagnostic_code to string; example JSON updated
proto/frequenz/api/common/v1/microgrid/communication_components/communication_components.proto Changed vendor_diagnostic_code to string; example JSON updated
Comments suppressed due to low confidence (3)

proto/frequenz/api/common/v1/microgrid/sensors/sensors.proto:79

  • The JSON example uses "vendorErrorCode" but the actual field is vendor_diagnostic_code, which serializes to vendorDiagnosticCode. Update the example to match the field name.
//       "vendorErrorCode": "2003",

proto/frequenz/api/common/v1/microgrid/sensors/sensors.proto:94

  • Changing vendor_diagnostic_code from uint32 to string is a breaking change. Consider bumping the proto package version or adding migration notes for consumers.
optional string vendor_diagnostic_code = 2;

proto/frequenz/api/common/v1/microgrid/sensors/sensors.proto:94

  • Add or update tests to verify serialization and deserialization of the new string-based vendor_diagnostic_code values to prevent regressions.
optional string vendor_diagnostic_code = 2;

@tiyash-basu-frequenz tiyash-basu-frequenz added this pull request to the merge queue Jun 5, 2025
Merged via the queue into frequenz-floss:v0.x.x with commit a70906d Jun 5, 2025
6 of 7 checks passed
@tiyash-basu-frequenz tiyash-basu-frequenz deleted the 258_vendor_code_str branch June 5, 2025 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmd:skip-release-notes It is not necessary to update release notes for this PR part:protobuf Affects the protocol buffer definition files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

*Diagnostic message property vendor_diagnostic_code should be string

2 participants